﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class admin_admin : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        NguoiDung nd = new NguoiDung();
        //string user_sess = (string)Session["username_admin"];
        //if (user_sess != null || (!String.IsNullOrEmpty(user_sess)))
        //Label1.Text = "Chào " + nd.GetName(user_sess.Trim()) + ", ";
        if (Session["username_admin"] != null && Session["password_admin"] != null)
            Label1.Text = "Chào " + Session["username_admin"].ToString() + ", ";            
        else
            Response.Redirect("dangnhap.aspx");
    }
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        Session["username_admin"] = null;
        Session["password_admin"] = null;
        Response.Redirect("dangnhap.aspx");
    }
}
